home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / circuits / ocean / cacd_bin.000 / cacd_bin / bin / outgds < prev    next >
Encoding:
Text File  |  1994-05-06  |  1.1 KB  |  69 lines

  1.  
  2. : SccsId = "@(#)outgds.sh 4.1 (TU-Delft) 06/09/90"
  3. # outgds - put a GDS II-file on tape
  4. #
  5. # created by   : R. Paulussen
  6. # creation date: 08-Feb-1988
  7. #
  8. # A 1600 bpi non-rewind tape unit is used.
  9. USAGE="Usage: outgds maincell [volume]"
  10.  
  11. if test $# -gt 2
  12. then
  13.     echo ""
  14.     echo "$USAGE"
  15.     echo ""
  16.     exit 1
  17. fi
  18.  
  19. for dev in /dev/rmt12 /dev/rmt/0mn /dev/rmt/1mn no_dev
  20. do
  21.     if test -w $dev
  22.     then break
  23.     fi
  24. done
  25. if test $dev = no_dev
  26. then
  27.     echo "outgds: sorry: no writable tape device exist!"
  28.     exit 1
  29. fi
  30.  
  31. vol=1
  32. if test $# -eq 2
  33. then
  34.     vol=$2
  35. fi
  36.  
  37. if test $# -ge 1
  38. then
  39.     naam=$1
  40.     echo "Putting on tape maincell: $naam"
  41.     echo "Volume: $vol"
  42.     echo "**** outgds starting ****"
  43.     dd if=$naam'.gds.'$vol of=$dev bs=2048
  44.     if test $? -ne 0
  45.     then
  46.     echo "outgds: tape write error"
  47.     exit 1
  48.     fi
  49.     echo "**** outgds finished ****"
  50.     echo "maincell $naam volume $vol on tape"
  51.     if test $# -eq 2
  52.     then
  53.     echo "Mount new tape for a next volume, please"
  54.     echo "and use outgds again"
  55.     fi
  56.     mt -t $dev rew
  57.     mt -t $dev offl
  58. else
  59.     echo ""
  60.     echo "$USAGE"
  61.     echo ""
  62.     exit 1
  63. fi
  64.  
  65. exit 0
  66. # end of script
  67.